#include<bits/stdc++.h>
using namespace std;
#define f(a,b,c,d) for(int a=b;a<=c;a+=d)
int n,a[100100],f,num=1,p[100100];
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	scanf("%d",&n);
	f(i,1,n,1) scanf("%d",&a[i]);
	sort(a+1,a+n+1);
	a[n+1]=-1;
	f(i,2,n+1,1){
		if(a[i]!=a[i-1]) p[++f]=num,num=1;
		else num++;
	}
	f(i,2,f,1){
		n-=min(p[i],p[i-1]);
		p[i]+=(p[i-1]-min(p[i],p[i-1]));
	}
	printf("%d",n);
	return 0;
}
